using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Data;

namespace Test {
	class PWMS {
		static void MainX() {
			DAL dal=new DAL("pon-wpsq09-db","pwms");


			foreach(string str in File.ReadAllLines("c:\\locs.txt"))
			{
				DataTable tab=dal.Query("select location,tmid,status from pwmspandD where location like '{0}%' and status!='A'",str);
				if(tab.Rows.Count==1)
				{
					Console.WriteLine(tab.Rows[0]["location"]);
					Console.WriteLine(tab.Rows[0]["tmid"]);
					Console.WriteLine(tab.Rows[0]["status"]);
					object obl=tab.Rows[0]["location"];
					//Console.WriteLine(dal.NonQry("update pwmspandD set tmid = '00000000', Status= 'A' where location= '{0}'",obl));

				}


			}



		}


	}
}
